/*
 * @Author: malgee
 * @Date: 2025-04-28 09:35:05
 * @LastEditors: maling
 * @LastEditTime: 2025-04-28 09:37:32
 * @FilePath: /vue3-ts-cms/src/hooks/use-page-search.ts
 * @Description: 
 * 
 */
import { ref } from 'vue'
import pageContent from '@/components/page-content'

export function usePageSearch() {
  const pageContentRef = ref<InstanceType<typeof pageContent>>()
  const handleResetClick = () => {
    pageContentRef.value?.getPageData()
  }
  const handleQueryClick = (queryInfo: any) => {
    pageContentRef.value?.getPageData(queryInfo)
  }
  return [pageContentRef, handleResetClick, handleQueryClick]
}